package com.cskaoyan.bean.wx.llk;

import lombok.Data;

import java.util.List;

@Data
public class WxItemsBean<T> {

    /**
     * cartTotal : {"goodsCount":4,"checkedGoodsCount":4,"goodsAmount":629,"checkedGoodsAmount":629}
     * cartList : [{"id":61,"userId":1,"goodsId":1010001,"goodsSn":"1010001","goodsName":"澳洲纯羊毛盖毯 舒适款","productId":19,"price":299,"number":2,"specifications":["标准"],"checked":true,"picUrl":"http://yanxuan.nosdn.127.net/a8b0a5def7d64e411dd98bdfb1fc989b.png","addTime":"2021-01-12 16:09:29","updateTime":"2021-01-12 16:10:26","deleted":false},{"id":62,"userId":1,"goodsId":1127047,"goodsSn":"1127047","goodsName":"趣味粉彩系列笔记本","productId":182,"price":29,"number":1,"specifications":["标准"],"checked":true,"picUrl":"http://yanxuan.nosdn.127.net/6c03ca93d8fe404faa266ea86f3f1e43.png","addTime":"2021-01-12 16:11:30","updateTime":"2021-01-12 16:11:30","deleted":false},{"id":63,"userId":1,"goodsId":1056002,"goodsSn":"1056002","goodsName":"男式玩色内裤","productId":291,"price":2,"number":1,"specifications":["标准","3","4","123","234"],"checked":true,"picUrl":"http://yanxuan.nosdn.127.net/922fdbe007033f7a88f7ebc57c3d1e75.png","addTime":"2021-01-12 16:13:07","updateTime":"2021-01-12 16:13:07","deleted":false}]
     */

    private CartTotalBean cartTotal;
    private List<T> cartList;

    public static<T> WxItemsBean data(CartTotalBean cartTotal, List<T> items) {
        WxItemsBean itemsBean = new WxItemsBean();
        itemsBean.setCartList(items);
        itemsBean.setCartTotal(cartTotal);
        return itemsBean;
    }
}